﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IBaseRepository.cs" company="Concept Architecture">
//   (c) 2010 Muhammad Umer Farooq
// </copyright>
// <summary>
//   Defines the  interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Hisaab.Data.Interfaces
{
    /// <summary>
    /// Defines the <seealso cref="Hisaab.Data.Interfaces.IBaseRepository&lt;T&gt;"/> interface.
    /// </summary>
    /// <typeparam name="T">Type of repository</typeparam>
    public interface IBaseRepository<T> : IReadOnlyRepository<T>
    {
        /// <summary>
        /// Adds the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <returns>Id of entity added</returns>
        int Add(T entity);

        /// <summary>
        /// Updates the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        void Update(T entity);

        /// <summary>
        /// Deletes the specified entity.
        /// </summary>
        /// <param name="entity">The entity.</param>
        void Delete(T entity);
    }
}